@extends('home.frame')

@section('content')
<link href="/ho/css/personal.css" rel="stylesheet" type="text/css">
<link href="/ho/css/stepstyle.css" rel="stylesheet" type="text/css">
<link href="/ho/css/infstyle.css" rel="stylesheet" type="text/css">

<div class="am-cf am-padding">
	<div class="am-fl am-cf"><strong class="am-text-danger am-text-lg">修改密码</strong> / <small>Password</small></div>
</div>
<hr/>
<!--进度条-->
<div class="m-progress">
	@if(is_object($errors) && count($errors) > 0)
		                  <div style="color:red;" class="one" onclick="$(this).css('display','none')">
		                    验证失败：
		                      <ul>
		                          @foreach ($errors->all() as $error)
		                              <li>{{ $error }}</li>
		                          @endforeach
		                      </ul>
		                  </div>
		              @elseif(is_string($errors))
		                <div style="color:red;" class="one" onclick="this.style.display='none'">
		                    验证失败：
		                      <ul>
		                        <li>{{$errors}}</li>
		                      </ul>
		                  </div>
		              @endif
		              @if(session('success'))
		              	<div style="color:green;" class="one" onclick="this.style.display='none'">
		                      <ul>
		                        <li>{{ session('success')}}</li>
		                      </ul>
		                  </div>
		              @endif
</div>
<form class="am-form am-form-horizontal" action="/home/userinfo/updatepass?uid={{session('user')->uid}}" method="post">
	{{csrf_field()}}
	<div class="am-form-group">
		<label for="user-old-password" class="am-form-label">原密码</label>
		<div class="am-form-content">
			<input type="password" id="user-old-password" placeholder="请输入原登录密码" name="oldpassword">
		</div>
	</div>
	<div class="am-form-group">
		<label for="user-new-password" class="am-form-label">新密码</label>
		<div class="am-form-content">
			<input type="password" id="user-new-password" placeholder="由数字、字母组合" name="upassword">
		</div>
	</div>
	<div class="am-form-group">
		<label for="user-confirm-password" class="am-form-label">确认密码</label>
		<div class="am-form-content">
			<input type="password" id="user-confirm-password" placeholder="请再次输入上面的密码" name="urepassword">
		</div>
	</div>
	<div class="info-btn">
		<button class="am-btn am-btn-danger">保存修改</button>
	</div>

</form>

@endsection